#include "CGameSceneFactory.h"
#include "IGameSceneManager.h"
namespace game
{
	namespace scene
	{

		IGameScene* CGameSceneFactory::startScreenSceneCreator(SGameSceneEntry* entry)
		{
			IGameScene* result = new CStartScreenScene(entry, entry->GameSceneManager->getSceneManager(), entry->GameSceneManager->getVideoHandler());
			return result;
		}

		IGameScene* CGameSceneFactory::inGameSceneCreator(SGameSceneEntry* entry)
		{
			IGameScene* result = new CInGameScene(entry, entry->GameSceneManager->getSceneManager(), entry->GameSceneManager->getVideoHandler());
			return result;
		}

		void registerSceneTypes(IGameSceneManager* gameSceneManager)
		{
			scene::delegateGameSceneCreator* startScreenSceneCreator = new scene::delegateGameSceneCreator;
			*startScreenSceneCreator += NewDelegate(&CGameSceneFactory::startScreenSceneCreator);
			gameSceneManager->registerGameSceneType("startscreenscene", startScreenSceneCreator);

			scene::delegateGameSceneCreator* inGameSceneCreator = new scene::delegateGameSceneCreator;
			*inGameSceneCreator += NewDelegate(&CGameSceneFactory::inGameSceneCreator);
			gameSceneManager->registerGameSceneType("ingamescene", inGameSceneCreator);

		}

	}
}